#pragma once

#include "ControlEx/ForUIDialog.h"
#include "ControlEx/ControlUI.h"
#include "ControlEx/UIConfig.h"
#include "resource.h"

class CLoginView;

// CLoginDlg dialog

class CLoginDlg : public CForUIDialog
{
public:
	BEGIN_MSG_MAP(CLoginDlg)
		//MESSAGE_HANDLER(WM_KEYDOWN, OnKeyMsg)
		//MESSAGE_HANDLER(WM_CHAR, OnChar)
		//MESSAGE_HANDLER(WM_KEYUP, OnKeyMsg)
		MESSAGE_HANDLER(WM_INITDIALOG, OnInitDialog)
		MESSAGE_HANDLER(WM_DESTROY, OnDestroy)
		COMMAND_ID_HANDLER(IDOK, OnOK)
		COMMAND_ID_HANDLER(IDCANCEL, OnCloseCmd)
		CHAIN_MSG_MAP(CForUIDialog)
	END_MSG_MAP()

public:
	virtual BOOL PreTranslateMessage(MSG* pMsg)
	{
		return CWindow::IsDialogMessage(pMsg);
	}
	//CLoginDlg(CWnd* pParent = NULL);   // standard constructor
	//virtual ~CLoginDlg();

// Dialog Data
	enum { IDD = IDD_MAINDLG};

	LRESULT OnInitDialog(UINT /*uMsg*/, WPARAM /*wParam*/, LPARAM /*lParam*/, BOOL& /*bHandled*/);
	LRESULT OnDestroy(UINT /*uMsg*/, WPARAM /*wParam*/, LPARAM /*lParam*/, BOOL& /*bHandled*/);
	LRESULT OnCloseCmd(WORD /*wNotifyCode*/, WORD wID, HWND /*hWndCtl*/, BOOL& /*bHandled*/);
	LRESULT OnOK(WORD /*wNotifyCode*/, WORD wID, HWND /*hWndCtl*/, BOOL& /*bHandled*/);
    LRESULT OnKeyMsg(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);

private:
	CLoginView* m_pLoginView;
};
